Skip to content

Fix clang 11 and make icudata embed portable - #3

Merged
kentonv merged 3 commits into
mainfrom
kenton/clang-11
Sep 19, 2022
Merged

Fix clang 11 and make icudata embed portable#3
kentonv merged 3 commits into
mainfrom
kenton/clang-11

Conversation

@kentonv

@kentonv kentonv commented Sep 19, 2022

Copy link
Copy Markdown
Member

No description provided.

This is more broadly available, e.g. it's the default on Debian Bullseye.

This also means we don't need to hard-code the full path to Clang anymore, which is pretty nice.
@kentonv
kentonv requested review from jasnell and mrbbot September 19, 2022 19:10
Comment thread README.md Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we explicitly recommend at least clang 15 still?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, I don't think it matters. The only difference I'm aware of is the one missing use of concepts but it doesn't seem like enough to tell people to do extra work.

wd_cc_embed doesn't seem to work on Mac and it was magic copy-pasta to start with so I'm not sure how to fix it.

This approach is portable, but does result in a 57MB generated C++ file which is kinda gross.
@kentonv
kentonv merged commit decd0e2 into main Sep 19, 2022
@kentonv
kentonv deleted the kenton/clang-11 branch September 19, 2022 19:28
mrbbot added a commit to mrbbot/workerd that referenced this pull request Jun 22, 2023
netanelgilad added a commit to netanelgilad/workerd that referenced this pull request Jul 2, 2026
…wn (fork gap cloudflare#3)

Fork gap cloudflare#3 reported that a nested native child_process.spawn() from a
NON-drainProcess child hit EPERM on VFS writes (a registry fetch's cacache
mkdir failed), while the same write from a drain child succeeded -- the
drain/non-drain asymmetry was the sharp edge iso worked around by making every
generic child a drain child.

Investigation shows the write-permission path has NO drain-conditional gate on
this branch: RootDirectory::add (io/worker-fs.c++) returns NOT_PERMITTED only
when no shared writable store is reachable (tryGetSharedStore -> IoContext /
module-eval fallback / stack scope), which is independent of drainProcess. The
gate that produced gap cloudflare#3 was the PRE-re-root read-only root: before
'spike(vfs-root-mount): re-root the shared writable VFS at / instead of /tmp',
only /tmp was writable and '/' was read-only, so cacache/npm writes to cache
paths OUTSIDE /tmp hit the read-only root -> NOT_PERMITTED (surfacing as EPERM).
The re-root routes the ENTIRE root to the shared writable store, so the fix is
already present; no runtime change is required.

This regression test pins the invariant: a nested spawn writes a cacache-shape
tree (mkdir + writeFileSync under '/', OUTSIDE /tmp) and must succeed for BOTH a
non-drain AND a drain spawner -- proving write permission does not depend on
drain mode. It would have failed pre-re-root (write outside /tmp ->
NOT_PERMITTED).

Test only, no runtime behavior change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants